const hostUrl='';  //后端的服务器
const storageUrl='';  //存储服务器
const appId=''; 
const appSecret='';  
const version="v1.1.0";  // 当前版本
const gitSrc="https://gitee.com/Kadia/rubbish_classification";   // 源码仓库地址
const iconInfo=[{src:storageUrl+'/static/recyclable.png',label:'可回收物'},
				{src:storageUrl+'/static/food.png',label:'厨余垃圾'},
				{src:storageUrl+'/static/hazardous.png',label:'有害垃圾'},
				{src:storageUrl+'/static/other.png',label:'其他垃圾'}];
const cordColor=['var(--rubbish-recyclable)',
				'var(--rubbish-food)',
				'var(--rubbish-hazardous)',
				'var(--rubbish-other)'];
const typeName=['Recyclable','food','hazardous','other'];
let openId='';
function getRandomFileName(fileName) {
	const index = fileName.lastIndexOf(".");
	const type = fileName.substr(index + 1);
	const date = new Date();
	const name = date.getTime() + Math.random().toString(36).substr(2)+'.'+type;
	return name;
}
function PrefixZero(num, n) {
    return (Array(n).join(0) + num).slice(-n);
}
function tansf(utc_datetime) {
	const time = new Date(utc_datetime*1000);
	return time.getFullYear() + '-' + PrefixZero(time.getMonth() + 1, 2) + '-' + PrefixZero(time.getDate(), 2) + ' ' + PrefixZero(time.getHours(), 2) +
		':' + PrefixZero(time.getMinutes(), 2) + ':' + PrefixZero(time.getSeconds(), 2);
}
export default{
	hostUrl,
	storageUrl,
	appId,
	appSecret,
	version,
	gitSrc,
	openId,
	getRandomFileName,
	iconInfo,
	cordColor,
	typeName,
	tansf
}